#ifndef UDPZIGBUSCONNECTION_H
#define UDPZIGBUSCONNECTION_H

#include <AbstractZigbusConnection.h>
#include <QUdpSocket>

class UDPZigbusConnection : public AbstractZigbusConnection
{
    Q_OBJECT
private:
    QUdpSocket* socket;
    int port;

public:
    UDPZigbusConnection(int port, QObject* parent = 0);
    virtual ~UDPZigbusConnection();
    virtual bool isOpen() const;

public slots:
    virtual void sendMessage(ZigbusMessage);
    virtual bool open();
    virtual void close();
    void readPendingDatagrams();
};

#endif // UDPZIGBUSCONNECTION_H
